<?php $this->renderPartial('/_include/_content_menu');?>
<div class="main">
    <div class="body">
        <ul class="breadcrumb">
            <li><a href="<?php echo $this->createUrl('default/index')?>">首页</a> <span class="divider">/</span></li>
            <li>文章列表</a> </li>
        </ul>
        <p class="oper"><a href="<?php echo $this->createUrl('article/create');?>" class="btn btn-info">添加</a></p>
        <table class="table table-striped">
            <tr>
                <th>文章标题</th>
                <th>所属栏目</th>
                <th>作者</th>
                <th>所属标签</th>
                <th>是否置顶</th>
                <th>发表日期</th>
                <th>操作</th>
            </tr>
            <?php foreach($data as $key=>$value):?>
                <tr>
                    <td title="<?php echo $value->article_title;?>"><?php echo BlogTool::cutText($value->article_title, 13);?></td>
                    <td><?php echo $value->article_nav?></td>
                    <td><?php echo $value->article_admin;?></td>
                    <td><?php echo empty($value->article_tag) ? '无' : $value->article_tag;?></td>
                    <td><?php echo $value->article_is_top == 1 ? '是' : '否';?></td>
                    <td><?php echo $value->article_date?></td>
                    <td>
                        <a href="<?php echo $this->createUrl('article/update', array('id'=>$value->id));?>" class="btn"><i class="icon-edit"></i></a>
                        <a onclick="return confirm('确认删除？') ? true : false;" href="<?php echo $this->createUrl('article/delete', array('id'=>$value->id))?>" class="btn"><i class="icon-remove"></i></a>
                    </td>
                </tr>
            <?php endforeach?>
        </table>
        <div class="yii-pager">
            <?php $this->widget('BLinkPager',
                array(
                    'pages'=>$pager,
                    'prevPageLabel'=>'上一页',
                    'nextPageLabel'=>'下一页',
                    'header'=>''
                ));?>
        </div>
    </div>
</div>
